package supplier

import (
	"app/api/handler/supplier/user"
	"app/api/middleware"
	"github.com/gin-gonic/gin"
)

// supplier组织的路由分组
func Router(router *gin.RouterGroup) {
	//发送邮箱验证码
	router.POST("/SendCode", user.SendCode)
	//商家用户实现注册
	router.POST("/Register", user.Register)
	//账号密码登陆
	router.POST("/LoginPass", user.LoginPass)
	//账号验证码登陆
	router.POST("/LoginCode", user.LoginCode)
	//获取首页数据
	router.POST("/GetSupplierIndex", middleware.SupplierJwtTokenValid, user.GetSupplierIndex)
	//搜索商品
	router.POST("/SupplierSearchGoods", middleware.SupplierJwtTokenValid, user.SupplierSearchGoods)
	//获取商品列表
	router.POST("/GetSupplierGoods", middleware.SupplierJwtTokenValid, user.GetSupplierGoods)
	//获取单个商品详情
	router.POST("/GetSupplierGoodsDetail", middleware.SupplierJwtTokenValid, user.GetSupplierGoodsDetail)
	//修改商品状况
	router.POST("/ModifySupplierGoodsStatus", middleware.SupplierJwtTokenValid, user.ModifySupplierGoodsStatus)
	//添加商品
	router.POST("/AddSupplierGoods", middleware.SupplierJwtTokenValid, user.AddSupplierGoods)
	//删除商品
	router.POST("/DeleteSupplierGoods", middleware.SupplierJwtTokenValid, user.DeleteSupplierGoods)
	//搜索订单
	router.POST("/SearchSupplierOrder", middleware.SupplierJwtTokenValid, user.SearchSupplierOrder)
	//获取订单信息
	router.POST("/GetSupplierOrderData", middleware.SupplierJwtTokenValid, user.GetSupplierOrderData)
	//查看订单详情
	router.POST("/GetSupplierOrderDetail", middleware.SupplierJwtTokenValid, user.GetSupplierOrderDetail)
	//实现商品修改
	router.POST("/ModifySupplierGoods", middleware.SupplierJwtTokenValid, user.ModifySupplierGoods)
	//实现订单发货
	router.POST("/SupplierDeliverOrder", middleware.SupplierJwtTokenValid, user.SupplierDeliverOrder)
	//切换头像
	router.POST("/SupplierChangeHead", middleware.SupplierJwtTokenValid, user.SupplierChangeHead)
}
